//
//  YKFarmViewModel.h
//  YK_BaseMediator
//
//  Created by edward on 2021/3/11.
//  Copyright © 2021 Edward. All rights reserved.
//

#import <YKOCBaseClass/YKViewModel.h>

NS_ASSUME_NONNULL_BEGIN

@interface YKFarmViewModel : YKViewModel

#pragma mark -----------list------------
- (instancetype)initWithUserId:(NSString *)userId;
///获取用户农场列表
@property(nonatomic,strong,readonly) RACCommand *farmListCommand;
///用户添加农场
@property(nonatomic,strong,readonly) RACCommand *addfarmCommand;
///
@property(nonatomic,strong,readonly) NSMutableArray *farmListArray;

- (void)getFarmListName:(NSIndexPath *)indexPath block:(void(^)(NSString *name,NSString *farmListId))block;

#pragma mark -----------data------------

///
@property(nonatomic,strong,readonly) NSMutableArray *farmDataListArray;
///此农场每日列表
@property(nonatomic,strong,readonly) RACCommand *farmDataListCommand;
///添加农场日期内容
@property(nonatomic,strong,readonly) RACCommand *addfarmDataListCommand;
///删除本次农场内容
@property(nonatomic,strong,readonly) RACCommand *deletefarmDataListCommand;
///
@property(nonatomic,strong,readonly) RACSubject *reloadSubject;

- (void)getFarmDataListDetail:(NSIndexPath *)indexPath block:(void(^)(NSString *date,NSString *sumDrug,NSString *sumFood,NSString *farmId))block;

- (void)clearDataList;
#pragma mark -----------everDay------------

///
@property(nonatomic,strong) NSMutableDictionary *farmEveryDayDic;
///获取农场当天每日内容
@property(nonatomic,strong,readonly) RACCommand *farmEveryDayCommand;

- (void)getFarmEveryDay:(NSIndexPath *)indexPath block:(void(^)(NSString *name,NSString *detail))block;

- (void)setEveryDatDetil:(NSIndexPath *)indexPath detail:(NSString *)detail;
/**保存农场每日内容*/
@property (nonatomic, strong,readonly) RACCommand *saveEveryDayComm;

#pragma mark -----------water------------

///
@property(nonatomic,strong) NSMutableDictionary *farmWaterDic;
///获取当前日期农场水质具体情况
@property(nonatomic,strong,readonly) RACCommand *farmWaterCommand;

- (void)getFarmWater:(NSIndexPath *)indexPath block:(void(^)(NSString *name,NSString *detail))block;

- (void)setWaterDetil:(NSIndexPath *)indexPath detail:(NSString *)detail;
/**保存当前日期农场水质具体情况*/
@property (nonatomic, strong,readonly) RACCommand *saveWaterComm;

#pragma mark -----------food------------
///
@property(nonatomic,strong) NSMutableArray *foodArray;
///获取当前日期农场喂食情况
@property(nonatomic,strong,readonly) RACCommand *farmFoodCommand;
/**保存当前日期农场喂食情况*/
@property (nonatomic, strong,readonly) RACCommand *saveFoodComm;
/**删除农场当前日期喂食情况*/
@property (nonatomic, strong,readonly) RACCommand *deleteFoodComm;

- (void)getFoodDetail:(NSIndexPath *)indexPath block:(void(^)(NSString *MealTime,NSString *foodname,NSString *much,NSString *eattime,NSString *createTime,NSString *drugname,NSString *drugmuch,NSString *foodId))block;

- (void)clearFoodList;

#pragma mark -----------drug------------
///
@property(nonatomic,strong) NSMutableArray *drugArray;
///获取当前日期喂药记录
@property(nonatomic,strong,readonly) RACCommand *farmDrugCommand;
/**保存当前日期喂药记录*/
@property (nonatomic, strong,readonly) RACCommand *saveDrugComm;
/**删除挡墙日期喂药记录*/
@property (nonatomic, strong,readonly) RACCommand *deleteDrugComm;

- (void)getDrugDetail:(NSIndexPath *)indexPath block:(void(^)(NSString *drugname,NSString *much,NSString *MealTime,NSString *createTime,NSString *drugId))block;

- (void)clearDrugList;

@end

NS_ASSUME_NONNULL_END
